package com.game.HUD;

import javax.microedition.khronos.opengles.GL10;

import object.obj2D.graphics.TexSquare;
import object.obj2D.graphics.Texture;
import system.Device;
import system.Graphics;

import com.game.R;

public class ShowTarget {
	private static int s_iTargetWidth = 35;
	private static int s_iTargetHeight = 35;
	private static int m_texTargetID;
	private static TexSquare m_targetSquare;
	private static GL10 gl;
	private static Texture m_texture;
	
	public static void Init()
	{
		gl = Graphics.GetGraphics();
		m_texture = new Texture();
		
		m_texTargetID = m_texture.initTexture(R.drawable.target);
		
		Device.DisableScaleFactor();
		m_targetSquare = new TexSquare(s_iTargetWidth, s_iTargetHeight);
		Device.EnableScaleFactor();
		
	}
	
	
	public static void Render()
	{
		gl.glMatrixMode(GL10.GL_MODELVIEW);
		gl.glPushMatrix();
		
		m_texture.loadTexture(m_texTargetID);
		m_targetSquare.Render();
		
		gl.glPopMatrix();
	}
}
